﻿using System.Configuration;
using System.Xml;
using Inscriptionem.Configuration.Elements.Base;

namespace Inscriptionem.Configuration.Elements.Members.Mail
{
    public class RemindElement : BaseConfigurationElement
    {
        public class BodyElement : ConfigurationElement
        {
            protected override void DeserializeElement(XmlReader reader, bool s)
            {
                Value = reader.ReadElementContentAs(typeof(string), null) as string;
            }

            public string Value { get; private set; }
        }

        [ConfigurationProperty("subject", DefaultValue = "", IsRequired = true)]
        public string Subject
        {
            get
            {
                return (string)this["subject"];
            }
            set
            {
                this["subject"] = value;
            }
        }

        [ConfigurationProperty("Body")]
        public BodyElement Body
        {
            get
            {
                return (BodyElement)this["Body"];
            }
            set
            {
                this["Body"] = value;
            }
        }

    }
}